<!DOCTYPE html>
<html>
<head>
    <title>木兰湾管理系统</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="description" content="木兰湾管理系统">
    <script type="text/javascript" src="../../static/include/header-css.js"></script>
    <style>
        .weui-iframe {
            box-sizing: border-box;
            height: calc(100% - 50px);
            bottom:0em;
            left:0;
            right:0;
        }
    </style>
</head>
<body ontouchstart>

<div class="weui-tab">
    <div class="weui-iframe" >
        <iframe id="framePage" src="dataIndex.html" style="width:100%;height:100%;"></iframe>
    </div>

    <div class="weui-tabbar">
        <a href="#" class="weui-tabbar__item weui-bar__item--on" onclick="showPage('dataIndex.html')">
            <div class="weui-tabbar__icon">
                <img src="../../static/image/database-l.png" alt="">
            </div>
            <p class="weui-tabbar__label">数据管理</p>
        </a>
        <a href="#" class="weui-tabbar__item" onclick="showPage('../chart/userChartStat.html')">
            <div class="weui-tabbar__icon">
                <img src="../../static/image/chart-l.png" alt="">
            </div>
            <p class="weui-tabbar__label">图表统计</p>
        </a>
        <a href="#" class="weui-tabbar__item" onclick="showPage('../notify/userNotifySwiper.html')">
            <div class="weui-tabbar__icon">
                <img src="../../static/image/remind-l.png" alt="">
            </div>
            <p class="weui-tabbar__label">提醒列表</p>
        </a>
        <a href="#" class="weui-tabbar__item" onclick="showPage('my.html')">
            <div class="weui-tabbar__icon">
                <img src="../../static/image/icon_nav_cell.png" alt="">
            </div>
            <p class="weui-tabbar__label">个人中心</p>
        </a>
    </div>
</div>
<script type="text/javascript" src="../../static/include/footer-js.js"></script>
<script type="text/javascript">
    $(function () {
        var ct =getBrowserClientType();
        if(ct=='ALIPAY'){
            //查收最新的消息
            setInterval(getNewMessage, 5000);
        }
    });
    function showPage(url){
        document.getElementById("framePage").src = url;
    }
    function getNewMessage() {
        var url='/userMessage/getLatestMessage';
        doAjax2(null,url,'GET',false,false,function(rtData){
            if(rtData){
                $.noti({
                    title: '有一条新的消息!',
                    text: rtData.title,
                    media: "<img src='../../static/image/new-s.png' />",
                    data: {
                        message: "新的消息"
                    },
                    time: 5000,
                    onClick: function(data) {
                        $.alert(rtData.content);
                    }
                });
            }
        });
    }
</script>
</body>
</html>